package com.iweb.newa202104.Mapper;

import com.iweb.newa202104.dto.QuestionOutputDTO;
import com.iweb.newa202104.entity.QuestionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

/**
 * @Author: LGZ
 * @Date: 2021/5/11 19:39
 * @Description:
 */
@Mapper
@Component
public interface QuestionMapper {
    /**
     * TODO
     * @Description 创建提问
     * @Author lgz
     * @Date 2021/5/11 19:40
     * @param questionEntity :
     * @return : void
     */
    void createQuestion(QuestionEntity questionEntity);

    /**
     * TODO
     * @Description 通过用户ID获取提问
     * @Author lgz
     * @Date 2021/5/11 20:00
     * @param questionEntity :
     * @return : com.iweb.newa202104.entity.QuestionEntity[]
     */
    QuestionOutputDTO[] getQuestionByUser(QuestionEntity questionEntity);

    /**
     * TODO
     * @Description 获取自己的提问数
     * @Author lgz
     * @Date 2021/5/18 11:31
     * @param questionEntity :
     * @return : int
     */
    int getMyQuestionCounts(QuestionEntity questionEntity);

    /**
     * TODO
     * @Description 按分类获取提问
     * @Author lgz
     * @Date 2021/5/11 20:36
     * @param questionEntity :
     * @return : com.iweb.newa202104.entity.QuestionEntity[]
     */
    QuestionOutputDTO[] getQuestionsByCategory(QuestionEntity questionEntity);

    /**
     * TODO
     * @Description 获取所有提问
     * @Author lgz
     * @Date 2021/5/11 22:12
     * @return : com.iweb.newa202104.entity.QuestionEntity[]
     */
    QuestionOutputDTO[] getAllQuestion();

    /**
     * TODO
     * @Description 采纳回答
     * @Author lgz
     * @Date 2021/5/11 22:13
     * @param questionEntity :
     */
    void acceptResponse(QuestionEntity questionEntity);

    /**
     * TODO
     * @Description 删除问题
     * @Author lgz
     * @Date 2021/5/18 21:33
     * @param questionEntity :
     * @return : void
     */
    void deleteQuestion(QuestionEntity questionEntity);

    /**
     * TODO
     * @Description 点赞
     * @Author lgz
     * @Date 2021/5/20 11:40
     * @param questionEntity :
     * @return : void
     */
    void giveLike(QuestionEntity questionEntity);
}
